Skip to content

Rewrite in Golang#2

Open
martialblog wants to merge 6 commits into
mainfrom
golang
Open

Rewrite in Golang#2
martialblog wants to merge 6 commits into
mainfrom
golang

Conversation

@martialblog

Copy link
Copy Markdown
Member

No description provided.

martialblog and others added 2 commits June 29, 2026 12:56
Co-authored-by: Christoph Breit <christoph.breit@netways.de>
@martialblog martialblog self-assigned this Jun 29, 2026
Comment thread cmd/root.go
Comment thread cmd/root.go Outdated
Comment thread cmd/root.go Outdated
Comment thread cmd/root.go Outdated
Comment thread cmd/root.go
Comment thread cmd/root.go
Comment thread cmd/root.go Outdated

msg := fmt.Sprintf("Registered on network '%s' with signal strength %0.f%%", network, sigproc)

result.Output = msg

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just result.Output = fmt.Sprinf....?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because sometimes i have to add additional info to the message string I wanted to reuse it instead of having it multiple times.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused on why we set the msg twice? And why only in the warning state?

msg := fmt.Sprintf("Registered on network '%s' with signal strength %0.f%%", network, sigproc)

result.SetOutput(msg)
....
else if warningThreshold.DoesViolate(sigproc) {
result.SetState(check.Warning)
result.SetOutput(msg)

@RincewindsHat

Copy link
Copy Markdown
Member

Why move the files to the legacy directory? This is a git repo, they can just be removed here.

@martialblog

Copy link
Copy Markdown
Member Author

Why move the files to the legacy directory? This is a git repo, they can just be removed here.

True. We've done this before, I think so that the old code is more visible. We can still remove it at some point

@martialblog

Copy link
Copy Markdown
Member Author

Hint, I added our default Github Config to the branch

Co-authored-by: Markus Opolka <markus.opolka@netways.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants